---
title: 自訂錢包列表
description: 自訂錢包列表設置
---

# 自訂錢包列表

## 自訂錢包列表設置

您可以從 `'@rainbow-me/rainbowkit/wallets'` 中導入單獨的錢包，並使用 `connectorsForWallets` 函數來建立自己的錢包列表及其必要的連接器。 這樣，您可以完全控制顯示哪些錢包，以及顯示的順序。

例如，您可以選擇只顯示 Rainbow 以及通用的備用錢包。

```tsx
import { connectorsForWallets } from '@rainbow-me/rainbowkit';
import {
  rainbowWallet,
  walletConnectWallet,
} from '@rainbow-me/rainbowkit/wallets';

const connectors = connectorsForWallets(
  [
    {
      groupName: 'Recommended',
      wallets: [rainbowWallet, walletConnectWallet],
    },
  ],
  {
    appName: 'My RainbowKit App',
    projectId: 'YOUR_PROJECT_ID',
  }
);
```

然後，您可以將您的連接器傳遞給 Wagmi 的 `createConfig`。

```tsx
import { connectorsForWallets } from '@rainbow-me/rainbowkit';
import { createConfig } from 'wagmi';

const connectors = connectorsForWallets(/* ... */);

const config = createConfig({
  connectors,
  {/* Wagmi config */}
});

const queryClient = new QueryClient();

const App = () => (
  <WagmiProvider config={config}>
    <QueryClientProvider client={queryClient}>
      <RainbowKitProvider {...etc}>
        {/* Your App */}
      </RainbowKitProvider>
    </QueryClientProvider>
  </WagmiProvider>
);
```

### 內置錢包

以下錢包通過 `wallet` 對象提供。

#### 通用錢包

以下錢包針對通用連接方法而不是特定應用。因此，建議始終包括這些錢包。

##### WalletConnect

這是一個為未由列表中的其他錢包提供的基於 WalletConnect 的錢包而設計的備用選項。

**建議始終在列表中包含此錢包，以確保所有基於 WalletConnect 的錢包都得到支持。**

```tsx
import { walletConnectWallet } from '@rainbow-me/rainbowkit/wallets';
```

##### 注入錢包

這是一個為存在 `window.ethereum` 但未由列表中的其他錢包提供的情況而設計的備用錢包選項。當不需要備用或者沒有可用的注入錢包時，該錢包會自動隱藏。

**建議始終在列表中包含此錢包，以確保所有注入錢包都得到支持。**

```tsx
import { injectedWallet } from '@rainbow-me/rainbowkit/wallets';
```

##### Safe 錢包

對於支持 Safe Apps 的 dApps，讓用戶輕鬆連接到他們的 Safe vault 或 multi-sig，請包含 `safeWallet` 選項以自動連接。 Safe 選項僅在 Safe Wallet 瀏覽器環境中顯示。

```tsx
import { safeWallet } from '@rainbow-me/rainbowkit/wallets';
```

### 特定錢包

以下錢包通過 `wallet` 對象提供（按字母順序排列）。

#### 1inch 錢包

```tsx
import { oneInchWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Backpack

```tsx
import { backpackWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### 基本賬戶（前稱為 Coinbase 錢包）

這個錢包連接器支持基本帳戶，即 Coinbase 智能錢包的演變。它提供無縫認證和增強功能，例如子賬戶和支出許可權。

配置選項與[基本帳戶 SDK 參考](https://docs.base.org/base-account/reference/core/createBaseAccount)一致。

```tsx
import { baseAccount } from '@rainbow-me/rainbowkit/wallets';

// Configure attribution (choose one approach)
baseAccount.preference = {
  attribution: { auto: true }, // Smart Wallet generates origin-based identifier
};

// Or use custom attribution
baseAccount.preference = {
  attribution: { dataSuffix: '0x1234567890abcdef' }, // 16-byte hex identifier
};

// Configure sub-accounts
baseAccount.subAccounts = {
  creation: 'on-connect', // or 'manual'
  defaultAccount: 'sub', // or 'universal'
  funding: 'spend-permissions', // or 'manual'
};

// Configure paymaster URLs for gasless transactions
baseAccount.paymasterUrls = {
  [base.id]: 'https://api.developer.coinbase.com/rpc/v1/base/...',
};
```

#### BeraSig

```tsx
import { berasigWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Best 錢包

```tsx
import { bestWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Bifrost Wallet

```tsx
import { bifrostWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Binance Web3 錢包

```tsx
import { binanceWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Bitget

```tsx
import { bitgetWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Bitski

```tsx
import { bitskiWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Bitverse

```tsx
import { bitverseWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Bloom 錢包

```tsx
import { bloomWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Brave 錢包

```tsx
import { braveWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Bybit 錢包

```tsx
import { bybitWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Coin98 錢包

```tsx
import { coin98Wallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Compass 錢包

```tsx
import { compassWallet } from '@rainbow-me/rainbowkit/compassWallet';
```

#### Core

```tsx
import { coreWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### CTRL 錢包

```tsx
import { ctrlWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Dawn 錢包

```tsx
import { dawnWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Enkrypt 錢包

```tsx
import { enkryptWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### FoxWallet

```tsx
import { foxWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Frame 錢包

```tsx
import { frameWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Frontier 錢包

```tsx
import { frontierWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Gate 錢包

```tsx
import { gateWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### 雙子星錢包

這個智能錢包連接器通過 keys.gemini.com 的通行碼實現無縫身份驗證 - 無需下載、擴展或 API 密鑰。它開箱即用。

`appName` 參數是識別您的 dApp 所需的，`appIcon` 是為了品牌體驗而可選的。

```tsx
import { geminiWallet } from '@rainbow-me/rainbowkit/wallets';

const gemini = geminiWallet({
  appName: 'My App',
  appIcon: 'https://my-app.com/logo.png', // Optional
});
```

#### imToken

```tsx
import { imTokenWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### ioPay 錢包

```tsx
import { iopayWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Kaia 錢包

```tsx
import { kaiaWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Kaikas

```tsx
import { kaikasWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Kraken 錢包

```tsx
import { krakenWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Kresus 錢包

```tsx
import { kresusWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Ledger Live

```tsx
import { ledgerWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Magic Eden 錢包

```tsx
import { magicEdenWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### MetaMask

```tsx
import { metaMaskWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### MEW 錢包

```tsx
import { mewWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Nova 錢包

```tsx
import { novaWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### OKX 錢包

```tsx
import { okxWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Omni

```tsx
import { omniWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### OneKey

```tsx
import { oneKeyWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### ParaSwap

```tsx
import { paraSwapWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Phantom

```tsx
import { phantomWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### 波爾圖

```tsx
import { portoWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Rabby 錢包

```tsx
import { rabbyWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Rainbow

```tsx
import { rainbowWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Ramper 錢包

```tsx
import { ramperWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### 準備好

```tsx
import { readyWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Ronin 錢包

```tsx
import { roninWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Safeheron

```tsx
import { safeheronWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Taho

```tsx
import { tahoWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Talisman

```tsx
import { talismanWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Tokenary

```tsx
import { tokenaryWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### TokenPocket

```tsx
import { tokenPocketWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Trust 錢包

```tsx
import { trustWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Uniswap 錢包

```tsx
import { uniswapWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Valora

```tsx
import { valoraWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Wigwam

```tsx
import { wigwamWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### xPortal

```tsx
import { xPortalWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### Zerion

```tsx
import { zerionWallet } from '@rainbow-me/rainbowkit/wallets';
```

#### ZilPay

```tsx
import { zilPayWallet } from '@rainbow-me/rainbowkit/wallets';
```

### 示例

#### 排序

以下是顯示不同錢包的幾個示例，按不同順序排列。

顯示 MetaMask 以及通用備用錢包。

```tsx
import { connectorsForWallets } from '@rainbow-me/rainbowkit';
import {
  metaMaskWallet,
  walletConnectWallet,
} from '@rainbow-me/rainbowkit/wallets';

const connectors = connectorsForWallets(
  [
    {
      groupName: 'Recommended',
      wallets: [metaMaskWallet, walletConnectWallet],
    },
  ],
  { appName: 'RainbowKit App', projectId: 'YOUR_PROJECT_ID' },
);
```

顯示 Rainbow、MetaMask 和 Base 帳戶，連同通用的備用錢包。

```tsx
import { connectorsForWallets } from '@rainbow-me/rainbowkit';
import {
  rainbowWallet,
  metaMaskWallet,
  baseAccount,
  walletConnectWallet,
} from '@rainbow-me/rainbowkit/wallets';

const connectors = connectorsForWallets(
  [
    {
      groupName: 'Suggested',
      wallets: [
        rainbowWallet,
        metaMaskWallet,
        baseAccount,
        walletConnectWallet,
      ],
    },
  ],
  { appName: 'RainbowKit App', projectId: 'YOUR_PROJECT_ID' },
);
```

> 提醒：`wallets` 陣列的順序定義了錢包在用戶介面中顯示的順序。

#### 多個群組

您可以使用 `groupName` 鍵來命名不同的錢包群組。如果您想要向用戶傳達您推薦哪些錢包，以及其他可能的錢包，這樣做將非常有用。

推薦使用 Rainbow 和 MetaMask，但也提供 Base 帳戶以及通用的備用錢包。

```tsx
import { connectorsForWallets } from '@rainbow-me/rainbowkit';
import {
  rainbowWallet,
  metaMaskWallet,
  baseAccount,
  walletConnectWallet,
} from '@rainbow-me/rainbowkit/wallets';

const connectors = connectorsForWallets(
  [
    {
      groupName: 'Recommended',
      wallets: [rainbowWallet, metaMaskWallet],
    },
    {
      groupName: 'Others',
      wallets: [baseAccount, walletConnectWallet],
    },
  ],
  { appName: 'RainbowKit App', projectId: 'YOUR_PROJECT_ID' },
);
```
